package indigo.core.config;

import static indigo.core.config.SqlEntityConfiguration.DEFAULT_SQL_SESSION_FACTORY_BEAN_NAME;
import static indigo.core.config.SqlEntityConfiguration.DEFAULT_TEMPLATE_LOCATION;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import org.springframework.context.annotation.Import;
import org.springframework.core.annotation.AliasFor;

@Documented
@Retention(RUNTIME)
@Target(TYPE)
@Import(SqlEntityConfiguration.class)
public @interface EnableSqlEntity {
	@AliasFor("basePackages")
	String[] value() default {};

	@AliasFor("value")
	String[] basePackages() default {};

	String[] templateLocations() default DEFAULT_TEMPLATE_LOCATION;

	String sqlSessionFactoryRef() default DEFAULT_SQL_SESSION_FACTORY_BEAN_NAME;
}
